----------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\ado\personal\Aggregate source and target examples.log
  log type:  text
 opened on:   5 Jan 2012, 11:05:54

. do "C:\ado\personal\Aggregate source and target examples.do"

. clear all

. use "Directed Dyad example file.dta", replace

. 
. 
. *** Note: In the two following examples, the created spatial effect variable has no values f
> or country_i=="Japan"
. *** since Japan has no contiguous neighbor in this dataset
. 
. * Create aggregate source contagion spatial lag variable with (undirected) contiguity variab
> le as connectivity variable
. spagg  patentsfiled, weight(contig_or_less1000km) source(country_i) target(country_j) time(y
> ear) form(source) link(ik) sename(SL_aggsource_W_contig) filename(SL_aggsource_W_contig)



Checking version of mmerge.ado.
c:\ado\stbplus\m\mmerge.ado
*! 2.5.0  26feb2002

User needs to have mmerge.ado version 2.5.0 or higher installed.

If not, type net install mmerge, from(http://fmwww.bc.edu/RePEc/bocode/m) force  into editor t
> o install.



User has specified that:

   the generated spatial effect variable will represent aggregate source contagion.

   patentsfiled is the variable to be spatially lagged.

   country_i is the identifying variable of source unit i.

   country_j is the identifying variable of target unit j.

   contig_or_less1000km will link source unit i to source units k.

   year is the numeric time variable.

   the spatial effect is to be row-standardized.

If these assumptions are incorrect, the generated spatial effect variable will be incorrect.

The created spatial effect variable will be automatically merged into the original dataset.

   Warning: variable SL_aggsource_W_contig will be dropped from dataset before merging, if alr
> eady existant.

   Warning: file SL_aggsource_W_contig will be replaced in current working directory, if alrea
> dy existant.


*** Check the above. ***  --  Press q to break, press any other button to continue.

Generating spatial effect components for dyads involving 20 source units in total - please wai
> t.
..........
..........


Combining spatial effect components for 20 sources in total - please wait.
..........
..........


Appending spatial effect of 19 sources to spatial effect of source 1 - please wait.
.........
..........


File SL_aggsource_W_contig
  with variables country_i, country_j, year
  and SE variable SL_aggsource_W_contig saved in current working directory


Spatial lag variable SL_aggsource_W_contig merged into the original dataset.

. 
. * As above, but not row-standardized
. spagg  patentsfiled, weight(contig_or_less1000km) source(country_i) target(country_j) time(y
> ear) form(source) link(ik) sename(SL_aggsource_W_contig_norowst) filename(SL_aggsource_W_con
> tig_norowst) norowst



Checking version of mmerge.ado.
c:\ado\stbplus\m\mmerge.ado
*! 2.5.0  26feb2002

User needs to have mmerge.ado version 2.5.0 or higher installed.

If not, type net install mmerge, from(http://fmwww.bc.edu/RePEc/bocode/m) force  into editor t
> o install.



User has specified that:

   the generated spatial effect variable will represent aggregate source contagion.

   patentsfiled is the variable to be spatially lagged.

   country_i is the identifying variable of source unit i.

   country_j is the identifying variable of target unit j.

   contig_or_less1000km will link source unit i to source units k.

   year is the numeric time variable.

   the spatial effect is not to be row-standardized.

If these assumptions are incorrect, the generated spatial effect variable will be incorrect.

The created spatial effect variable will be automatically merged into the original dataset.

   Warning: variable SL_aggsource_W_contig_norowst will be dropped from dataset before merging
> , if already existant.

   Warning: file SL_aggsource_W_contig_norowst will be replaced in current working directory, 
> if already existant.


*** Check the above. ***  --  Press q to break, press any other button to continue.

Generating spatial effect components for dyads involving 20 source units in total - please wai
> t.
..........
..........


Combining spatial effect components for 20 sources in total - please wait.
..........
..........


Appending spatial effect of 19 sources to spatial effect of source 1 - please wait.
.........
..........


File SL_aggsource_W_contig_norowst
  with variables country_i, country_j, year
  and SE variable SL_aggsource_W_contig_norowst saved in current working directory


Spatial lag variable SL_aggsource_W_contig_norowst merged into the original dataset.

. 
. * Create aggregate target contagion spatial lag variable with directed exports from j to m a
> s connectivity variable (exports from i to j are automatically transformed)
. spagg  patentsfiled, weight(exports_i_to_j) source(country_i) target(country_j) time(year) f
> orm(target) link(jm) sename(SL_aggtarg_W_exports_j_to_m) filename(SL_aggtarg_W_exports_j_to_
> m)



Checking version of mmerge.ado.
c:\ado\stbplus\m\mmerge.ado
*! 2.5.0  26feb2002

User needs to have mmerge.ado version 2.5.0 or higher installed.

If not, type net install mmerge, from(http://fmwww.bc.edu/RePEc/bocode/m) force  into editor t
> o install.



User has specified that:

   the generated spatial effect variable will represent aggregate target contagion.

   patentsfiled is the variable to be spatially lagged.

   country_i is the identifying variable of source unit i.

   country_j is the identifying variable of target unit j.

   exports_i_to_j will link target unit j to target units m.

   year is the numeric time variable.

   the spatial effect is to be row-standardized.

If these assumptions are incorrect, the generated spatial effect variable will be incorrect.

The created spatial effect variable will be automatically merged into the original dataset.

   Warning: variable SL_aggtarg_W_exports_j_to_m will be dropped from dataset before merging, 
> if already existant.

   Warning: file SL_aggtarg_W_exports_j_to_m will be replaced in current working directory, if
>  already existant.


*** Check the above. ***  --  Press q to break, press any other button to continue.

Generating spatial effect components for dyads involving 20 target units in total - please wai
> t.
..........
..........


Combining spatial effect components for 20 targets in total - please wait.
..........
..........


Appending spatial effect of 19 targets to spatial effect of target 1 - please wait.
.........
..........


File SL_aggtarg_W_exports_j_to_m
  with variables country_i, country_j, year
  and SE variable SL_aggtarg_W_exports_j_to_m saved in current working directory


Spatial lag variable SL_aggtarg_W_exports_j_to_m merged into the original dataset.

. 
. * Create aggregate target contagion spatial lag variable with directed exports from m to j a
> s connectivity variable (exports from i to j are automatically transformed)
. spagg  patentsfiled, weight(exports_i_to_j) source(country_i) target(country_j) time(year) f
> orm(target) link(mj) sename(SL_aggtarg_W_exports_m_to_j) filename(SL_aggtarg_W_exports_m_to_
> j) 



Checking version of mmerge.ado.
c:\ado\stbplus\m\mmerge.ado
*! 2.5.0  26feb2002

User needs to have mmerge.ado version 2.5.0 or higher installed.

If not, type net install mmerge, from(http://fmwww.bc.edu/RePEc/bocode/m) force  into editor t
> o install.



User has specified that:

   the generated spatial effect variable will represent aggregate target contagion.

   patentsfiled is the variable to be spatially lagged.

   country_i is the identifying variable of source unit i.

   country_j is the identifying variable of target unit j.

   exports_i_to_j will link target units m to target unit j.

   year is the numeric time variable.

   the spatial effect is to be row-standardized.

If these assumptions are incorrect, the generated spatial effect variable will be incorrect.

The created spatial effect variable will be automatically merged into the original dataset.

   Warning: variable SL_aggtarg_W_exports_m_to_j will be dropped from dataset before merging, 
> if already existant.

   Warning: file SL_aggtarg_W_exports_m_to_j will be replaced in current working directory, if
>  already existant.


*** Check the above. ***  --  Press q to break, press any other button to continue.

Generating spatial effect components for dyads involving 20 target units in total - please wai
> t.
..........
..........


Combining spatial effect components for 20 targets in total - please wait.
..........
..........


Appending spatial effect of 19 targets to spatial effect of target 1 - please wait.
.........
..........


File SL_aggtarg_W_exports_m_to_j
  with variables country_i, country_j, year
  and SE variable SL_aggtarg_W_exports_m_to_j saved in current working directory


Spatial lag variable SL_aggtarg_W_exports_m_to_j merged into the original dataset.

. 
end of do-file

. log close
      name:  <unnamed>
       log:  C:\ado\personal\Aggregate source and target examples.log
  log type:  text
 closed on:   5 Jan 2012, 11:06:10
----------------------------------------------------------------------------------------------
